<div id="todo-{{ todo.id }}" class="{% if todo.completed %}completed{% endif %}">
    <span hx-post="{% url 'todo:toggle_todo' todo.id %}" hx-target="#todo-{{ todo.id }}" hx-swap="outerHTML">
        {{ todo.task_text }}
    </span>
    <button hx-delete="{% url 'todo:delete_todo' todo.id %}" hx-target="#todo-{{ todo.id }}" hx-swap="outerHTML">
        Delete
    </button>
</div>
